package edu.neusoft.springhtmldemo.service;

import edu.neusoft.springhtmldemo.domain.BroadcastManagement;
import edu.neusoft.springhtmldemo.mapper.BroadcastManagementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BroadcastManagementService {
    @Autowired
    private BroadcastManagementMapper mapper;

    public List<BroadcastManagement> showAll() {
        return mapper.selectAll();
    }

    public List<BroadcastManagement> selectBroadcastManagement(BroadcastManagement management) {
        return mapper.selectBroadcastManagement(management);
    }

    public void updateBroadcastManagement(BroadcastManagement management) {
        mapper.updateBroadcastManagement(management);
    }

    public void addBroadcastManagement(BroadcastManagement management) {
        mapper.addBroadcastManagement(management);
    }

    public void delBroadcastManagement(Integer broadcastID) {
        mapper.delBroadcastManagement(broadcastID);
    }

    public List<String> broadcastIPValues() {
        return mapper.broadcastIPValues();
    }

    public String broadcastNameValue(String broadcastIP) {
        return mapper.broadcastNameValue(broadcastIP);
    }
}
